import socket
import threading
import time


def client_thread():
    ss = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    ss.connect(("127.0.0.1", 9000))
    while True:
        ss.send("hello".encode("utf-8"))
        time.sleep(1)


threads = []
for i in range(10):
    t = threading.Thread(target=client_thread)
    t.start()
    threads.append(t)

for i in threads:
    i.join()
